#include "../include/EchoServer.h"
#include <iostream>

using std::cout;
using std::endl;
int pipefd[2];
double Accurate;
double Searched;
Logger* Logger::_pInstance=nullptr;


int main(int argc, char **argv)
{
    Accurate = 1;//用于控制缓存的使用
    Searched = 1;//用于控制缓存的使用
    // TcpServer.cc:extern int pipefd[2];
    // TcpServer.cc:        close(pipefd[0]);
    // TcpServer.cc:            write(pipefd[1], "x", 1);   // 每秒写入一个字节
    //eventloop.cc里面在读谁在写？read(pipefd[0], &c, 1);
    pipe(pipefd);
    
    //EchoServer server(4, 10, "127.0.0.1", 8888);
    EchoServer server(4, 20, "127.0.0.1", 8888);
    server.start();
    return 0;
}

